import request from '@/utils/request'

// 查询判责中心列表
export function listObligation(query) {
  return request({
    url: '/other/obligation/list',
    method: 'get',
    params: query
  })
}

export function listObligationWork() {
  return request({
    url: '/other/obligation/work',
    method: 'get'
  })
}

export function listObligationPrice(query) {
  return request({
    url: '/other/obligation/price',
    method: 'get',
    params: query
  })
}

// 查询判责中心详细
export function getObligation(id) {
  return request({
    url: '/other/obligation/' + id,
    method: 'get'
  })
}

// 新增判责中心
export function addObligation(data) {
  return request({
    url: '/other/obligation',
    method: 'post',
    data: data
  })
}

// 修改判责中心
export function updateObligation(data) {
  return request({
    url: '/other/obligation',
    method: 'put',
    data: data
  })
}

export function updateObligationExamine(data) {
  return request({
    url: '/other/obligation/examine',
    method: 'put',
    data: data
  })
}

// 导出判责中心
export function exportObligation(query) {
  return request({
    url: '/other/obligation/export',
    method: 'get',
    params: query
  })
}
